home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gr2ps / pspicture.latex < prev    next >
Encoding:
Text File  |  1989-05-16  |  1.4 KB  |  56 lines

  1. %
  2. %  (c) 1986 John Coker
  3. %  University of California, Berkeley
  4. %
  5. %  pspicture.latex - example LaTeX document with a PostScript picture
  6. %
  7. \documentstyle[12pt]{article}
  8.  
  9. \def\pspicture#1#2{\indent\vskip#2\special{#1}}
  10.  
  11. \begin{document}
  12. \def\\{\char92}
  13.  
  14. \def\PostScript{P{\small OST}S{\small CRIPT}}
  15.  
  16. This is a demonstration of a {\PostScript} picture inside \LaTeX.  We've
  17. done all this neatly with a simple {\LaTeX} macro that imbeds a
  18. {\tt \\special} command containing the name of a {\PostScript}
  19. file that is to be used as the picture itself.  Of course, this
  20. depends on the printer {\tt dvi} driver knowing that arguments to
  21. {\tt \\special}s are names of {\PostScript} files.
  22.  
  23. And now, of course, it's time for an example.
  24. The picture of the tank shown in Figure~1 was set into this text with the 
  25. simple set of commands:
  26.  
  27. \begin{verbatim}
  28. \begin{figure}
  29. \pspicture{tank.ps}{2.5in}
  30. \caption{A PostScript Picture}
  31. \end{figure}
  32. \end{verbatim}
  33.  
  34. \begin{figure}
  35. \pspicture{tank.ps}{2.5in}
  36. \caption{A PostScript Picture}
  37. \end{figure}
  38.  
  39. Here is text immediately following the picture.
  40. These macros depend on the user correctly specifying the picture
  41. height.
  42. There is no way for {\LaTeX} and {\PostScript} to
  43. interact so that {\LaTeX} could automatically know the height
  44. of a {\PostScript} picture.
  45.  
  46. \medskip
  47. \begin{tabbing}
  48. \hspace{2in}\=John Coker\\
  49. \nobreak
  50. \>August 1, 1986\\
  51. \end{tabbing}
  52.  
  53.  
  54. \end{document}
  55.  
  56.